
*********************************************************************
* Who punishes?										  			    *
*																	*
* Replication File													*
* Correspondence to:  												*
* talbot.andrews@uconn.edu 											*
* Data and codebook from: https://doi.org/10.5061/dryad.87301 		*
*********************************************************************

* Packages
	ssc install cibar
	ssc install brewscheme
	ssc install blindschemes
	set scheme plotplain

* Replace the following line with path to folder with replication materials on your machine:
	cd "/Users/talbot/Dropbox/Dissertation/Antisocial Punishment/analysis/Replication Files" //Talbot's working directory
	
* Running the following code will generate all figures from the main text and appendix
* It will also generate the results for all tables. Final table formatting for the manuscript was completed manually

import delimited HerrmannThoeniGaechterDATA.csv, clear

*~* Data Cleaning *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

* Cleaning
	gen muscatp = punishment if(city == "Muscat")
	gen athensp = punishment if(city == "Athens")
	gen riyadhp = punishment if(city == "Riyadh")
	gen samarap = punishment if(city == "Samara")
	gen minskp = punishment if(city == "Minsk")
	gen istanbulp = punishment if(city == "Istanbul")
	gen seoulp = punishment if(city == "Seoul")
	gen dnip = punishment if(city == "Dnipropetrovs'k")
	gen copenp = punishment if(city == "Copenhagen")
	gen bonnp = punishment if(city =="Bonn")
	gen zurichp = punishment if(city == "Zurich")
	gen chenp = punishment if(city == "Chengdu")
	gen galp = punishment if(city == "St. Gallen")
	gen notp = punishment if(city == "Nottingham")
	gen melbournep = punishment if(city == "Melbourne")
	gen bostonp = punishment if(city == "Boston")

	gen muscats = senderscontribution if(city == "Muscat")
	gen athenss = senderscontribution if(city == "Athens")
	gen riyadhs = senderscontribution if(city == "Riyadh")
	gen samaras = senderscontribution if(city == "Samara")
	gen minsks = senderscontribution if(city == "Minsk")
	gen istanbuls = senderscontribution if(city == "Istanbul")
	gen seouls = senderscontribution if(city == "Seoul")
	gen dnis = senderscontribution if(city == "Dnipropetrovs'k")
	gen copens = senderscontribution if(city == "Copenhagen")
	gen bonns = senderscontribution if(city =="Bonn")
	gen zurichs = senderscontribution if(city == "Zurich")
	gen chens = senderscontribution if(city == "Chengdu")
	gen gals = senderscontribution if(city == "St. Gallen")
	gen nots = senderscontribution if(city == "Nottingham")
	gen melbournes = senderscontribution if(city == "Melbourne")
	gen bostons = senderscontribution if(city == "Boston")

	gen muscato = otherscontribution if(city == "Muscat")
	gen athenso = otherscontribution if(city == "Athens")
	gen riyadho = otherscontribution if(city == "Riyadh")
	gen samarao = otherscontribution if(city == "Samara")
	gen minsko = otherscontribution if(city == "Minsk")
	gen istanbulo = otherscontribution if(city == "Istanbul")
	gen seoulo = otherscontribution if(city == "Seoul")
	gen dnio = otherscontribution if(city == "Dnipropetrovs'k")
	gen copeno = otherscontribution if(city == "Copenhagen")
	gen bonno = otherscontribution if(city =="Bonn")
	gen zuricho = otherscontribution if(city == "Zurich")
	gen cheno = otherscontribution if(city == "Chengdu")
	gen galo = otherscontribution if(city == "St. Gallen")
	gen noto = otherscontribution if(city == "Nottingham")
	gen melbourneo = otherscontribution if(city == "Melbourne")
	gen bostono = otherscontribution if(city == "Boston")

	*citycodes
	gen city_code = 1
	replace city_code = 2 if(city == "Melbourne")
	replace city_code = 3 if(city == "Nottingham")
	replace city_code = 4 if(city == "St. Gallen")
	replace city_code = 5 if(city == "Chengdu")
	replace city_code = 6 if(city == "Zurich")
	replace city_code = 7 if(city == "Bonn")
	replace city_code = 8 if(city == "Copenhagen")
	replace city_code = 9 if(city == "Dnipropetrovs'k")
	replace city_code = 10 if(city == "Seoul")
	replace city_code = 11 if(city == "Istanbul")
	replace city_code = 12 if(city == "Minsk")
	replace city_code = 13 if(city == "Samara")
	replace city_code = 14 if(city == "Riyadh")
	replace city_code = 15 if(city == "Athens")
	replace city_code = 16 if(city == "Muscat")

	*Culture Dummy:
	gen culture_dummy = .
	replace culture_dummy = 1 if(city_code == 1)
	replace culture_dummy = 1 if(city_code == 2)
	replace culture_dummy = 1 if(city_code == 3)
	replace culture_dummy = 2 if(city_code == 4)
	replace culture_dummy = 2 if(city_code == 8)
	replace culture_dummy = 2 if(city_code == 7)
	replace culture_dummy = 2 if(city_code == 6)
	replace culture_dummy = 3 if(city_code == 12)
	replace culture_dummy = 3 if(city_code == 9)
	replace culture_dummy = 3 if(city_code == 13)
	replace culture_dummy = 4 if(city_code == 15)
	replace culture_dummy = 4 if(city_code == 11)
	replace culture_dummy = 5 if(city_code == 14)
	replace culture_dummy = 5 if(city_code == 16)
	replace culture_dummy = 6 if(city_code == 10)
	replace culture_dummy = 6 if(city_code == 5)
	
	lab def culture 1 "English Speaking" 2 "Protestant Europe" 3 "Orthodox/Ex-Communist" 4 "Southern Europe" 5 "Arabic Speaking" 6 "Confucian"
		lab val culture_dummy culture
		
	lab def city 1 "Boston" 2 "Melbourne" 3 "Nottingham" 4 "St. Gallen" 5 "Chengdu" 6 "Zurich" ///
		7 "Bonn" 8 "Copenhagen" 9 "Dnipropetrovs'k" 10 "Seoul" 11 "Istanbul" 12 "Minsk" ///
		13 "Samara" 14 "Riyadh" 15 "Athens" 16 "Muscat"
	lab val city_code city
	
	* Variable for clustering by subject and group)
	gen new_cluster = subjectid * groupid
	
	* Dummy variable for whether someone punishes
	gen punish_dummy = 0 if(punishment != .)
	replace punish_dummy = 1 if(punishment > 0)
	
	* Categories for levels of sender contributions
	gen scon_cat = 0 if(senderscontribution == 0)
		replace scon_cat = 1 if(senderscontribution > 0 & senderscontribution <= 9)
		replace scon_cat = 2 if(senderscontribution > 10 & senderscontribution <= 19)
		replace scon_cat = 3 if(senderscontribution == 20)
		
	* Categories for levels of target contributions
	gen ocon_cat = 0 if(otherscontribution == 0)
		replace ocon_cat = 1 if(otherscontribution > 0 & otherscontribution <= 9)
		replace ocon_cat = 2 if(otherscontribution > 10 & otherscontribution <= 19)
		replace ocon_cat = 3 if(otherscontribution == 20)
		
	lab def ocon_cat 0 "T: Defector" 1 "T: Low contributor" 2 "T: High contributor" 3 "T: Full contributor"
	lab val ocon_cat ocon_cat
	
	lab def scon_cat 0 "P: Defector" 1 "P: Low contributor" 2 "P: High contributor" 3 "P: Full contributor"
	lab val scon_cat scon_cat
		
		
	* normalize contributions from 0-1
	* gen senderscontribution_01 = senderscontribution/20
	* gen otherscontribution_01 = otherscontribution/20

	* Drop participants in conditions without punishment
	drop if(p == "N-experiment")

*~* Analysis and Results *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

* Main Text

	* Figure 1
		
		* Probability punished by target contribution (Figure 1 Panel 1)
		reg punish_dummy c.senderscontribution##i.otherscontribution i.city_code, cluster(new_cluster) robust
			margins, over(otherscontribution)
			marginsplot, ///
				xlabel(,nogrid labsize(med)) ylabel(0(.1).7,nogrid labsize(med)) xtitle("Target Contribution", size(medlarge)) ytitle("Probability Punished", size(medlarge)) ///
				plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) title("") saving(punished1, replace)
				
		* Amount Punished by target contribution (Figure 1 Panel 2)
		reg punishment c.senderscontribution##i.otherscontribution i.city_code, cluster(new_cluster) robust
			margins, over(otherscontribution)
			marginsplot, ///
				xlabel(,nogrid labsize(med)) ylabel(,nogrid labsize(med)) xtitle("Target Contribution", size(medlarge)) ytitle("Amount Punished", size(medlarge)) ///
				plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) title("") saving(punished2, replace)
				
		gr combine punished1.gph punished2.gph, col(1) xsize(3) 
		graph save punished, replace
		
		* Amount punished by target contribution by city (Fig 1 Panel 3)
		reg punishment c.senderscontribution##c.otherscontribution##i.city_code, cluster(new_cluster) 
			margins, dydx(otherscontribution) at(city_code = (1 2 3 4 5 6 7 8 9 10  11 12 13 14 15 16))	
			marginsplot, csort yline(0) recast(scatter) ci1opts(recast(coefplot) color(black)) ///
				title("") plot1opts(color(black) msymbol(black)) ///
				ytitle("Predicted change in received punishment" "per token contributed", size(med)) ylabel(,nogrid) xtitle("")  ///
				xlabel(1 "Boston" 2 "Melbourne" 3 "Nottingham" ///
				4 "St. Gallen" 5 "Chengdu" 6 "Zurich" 7 "Bonn" 8 "Copen." 9 "Dnip." ///
				10 "Seoul" 11 "Istanbul" 12 "Minsk" 13 "Samara" 14 "Riyadh" 15 "Athens" ///
				16 "Muscat", ang(30) labsize(med) nogrid) yscale(titlegap(*-20))  ///
				saving(citypun1, replace) 
				
		* Figure 1 (combine panels)
		gr combine punished.gph citypun1.gph, ysize(5) xsize(10)
		graph export Figure1.png, height(1500) replace
		
	* Figure 2
	
		* Probability punish (Figure 2 Panel 1)
		reg punish_dummy i.senderscontribution##c.otherscontribution i.city_code, cluster(new_cluster) robust
		margins, over(senderscontribution)
		marginsplot, ///
			xlabel(,nogrid labsize(med)) ylabel(0(.1).5,nogrid labsize(med)) xtitle("Punisher Contribution", size(medlarge)) ytitle("Probability of Punishing", size(medlarge)) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) title("") saving(punish_des1, replace)
			
		* Punishment amount (Figure 2 Panel 2)
		reg punishment i.senderscontribution##c.otherscontribution i.city_code, cluster(new_cluster) 
		margins, over(senderscontribution)
		marginsplot, ///
			xlabel(,nogrid labsize(med)) ylabel(0(.5)1.5,nogrid labsize(med)) xtitle("Punisher Contribution", size(medlarge)) ytitle("Amount Punish", size(medlarge)) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) title("") saving(punish_des2, replace)
			
		gr combine punish_des1.gph punish_des2.gph, col(1) xsize(3)
		graph save punish, replace
		
		* Probability Punish by city (Figure 2 Panel 3)
		reg punish_dummy c.senderscontribution##i.city_code##c.otherscontribution, cluster(new_cluster) robust // Figure A4 & Table A2
			margins, dydx(senderscontribution) at(city_code = (1 2 3 4 5 6 7 8 9 10  11 12 13 14 15 16))
			marginsplot, csort yline(0) recast(scatter) ci1opts(recast(coefplot) color(b)) ///
				plot1opts(msymbol(circle) color(black)) ///
				title("") ///
				ytitle("Marginal effect of punisher contribution" "on probability of punishing", size(med)) xtitle("")  ///
				xlabel(1 "Boston" 2 "Melbourne" 3 "Nottingham" ///
				4 "St. Gallen" 5 "Chengdu" 6 "Zurich" 7 "Bonn" 8 "Copen." 9 "Dnip." ///
				10 "Seoul" 11 "Istanbul" 12 "Minsk" 13 "Samara" 14 "Riyadh" 15 "Athens" ///
				16 "Muscat", nogrid ang(30) labsize(med)) ylabel(-0.05(0.01)0.05, nogrid) yscale(titlegap(*-20)) ///
				saving(punisher_city, replace)

		* Combine panels for Figure 2
		gr combine punish.gph punisher_city.gph, ysize(5) xsize(10)
		graph export Figure2.png, height(1500) replace
		
	* Figure 3

		* Probability Punish (left panel)
		reg punish_dummy i.scon_cat##i.ocon_cat i.city_code, cluster(new_cluster) robust
		margins, at(ocon_cat = (0(1)3)) over(scon_cat)
			marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Probability Punished") title("") ylabel(,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(non_lin21, replace)
				
		* Amount Punish (right panel)
		reg punishment i.scon_cat##i.ocon_cat i.city_code, cluster(new_cluster) 
		margins, at(ocon_cat = (0(1)3)) over(scon_cat)
			marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished") title("") ylabel(,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(non_lin22, replace)
				
		grc1leg non_lin21.gph non_lin22.gph, legendfrom(non_lin22.gph) col(2) saving(non_lin2, replace)
		graph export Figure3.png, height(1500) replace
		
* Online Appendix: Figures

	* Figure A1: Probability punished by city and target contribution 
		reg punish_dummy c.senderscontribution##c.otherscontribution##i.city_code, cluster(new_cluster) 
			margins, dydx(otherscontribution) at(city_code = (1 2 3 4 5 6 7 8 9 10  11 12 13 14 15 16))	
			marginsplot, csort yline(0) recast(scatter) ci1opts(recast(coefplot) color(black)) ///
				title("") plot1opts(color(black) msymbol(black)) ///
				ytitle("Predicted Change" "in Pr(Punished)", size(med)) ylabel(,nogrid) xtitle("")  ///
				xlabel(1 "Boston" 2 "Melbourne" 3 "Nottingham" ///
				4 "St. Gallen" 5 "Chengdu" 6 "Zurich" 7 "Bonn" 8 "Copen." 9 "Dnip." ///
				10 "Seoul" 11 "Istanbul" 12 "Minsk" 13 "Samara" 14 "Riyadh" 15 "Athens" ///
				16 "Muscat", ang(30) labsize(med) nogrid) saving(citypun2, replace)
			graph export FigureA1.png, height(1500) replace
			
	* Figure A2 -- see below
	
	* Figure A3 -- see below
	
	* Figure A4: Probability punished by target contribution by culture 
		reg punish_dummy i.ocon_cat##c.scon_cat##i.culture_dummy, cluster(new_cluster)
		
			* English speaking
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 1)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("English Speaking", size(large)) ///
					saving(pr1, replace)
					
			* Protestant
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 2)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("Protestant Europe", size(large)) ///
					saving(pr2, replace)
					
			* Orthodox
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 3)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("Orthodox/Ex-Communist", size(large)) ///
					saving(pr3, replace)
					
			* Southern Euruope
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 4)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("Southern Europe", size(large)) ///
					saving(pr4, replace)
			
			* Arabic Speaking
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 5)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("Arabic Speaking", size(large)) ///
					saving(pr5, replace)
					
			* Confucian
			margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 6)
				marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
					xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
					xtitle("Target Contribution") ytitle("Pr(Punished)", size(medlarge)) ///
					ylabel(0(.25)1, labsize(med) nogrid) title("Confucian", size(large)) ///
					saving(pr6, replace)
					
			gr combine pr1.gph pr2.gph pr3.gph pr4.gph pr5.gph pr6.gph 
			graph export FigureA4.png, height(1500) replace

	* Figure A5: Amount punished by target contribution by culture
		reg punishment i.ocon_cat##c.scon_cat##i.culture_dummy, cluster(new_cluster)
	
		* English speaking
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 1)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("English Speaking", size(large)) ///
				saving(p1, replace)
				
		* Protestant
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 2)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("Protestant Europe", size(large)) ///
				saving(p2, replace)
				
		* Orthodox
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 3)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("Orthodox/Ex-Communist", size(large)) ///
				saving(p3, replace)
				
		* Southern Euruope
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 4)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("Southern Europe", size(large)) ///
				saving(p4, replace)
		
		* Arabic Speaking
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 5)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("Arabic Speaking", size(large)) ///
				saving(p5, replace)
				
		* Confucian
		margins, at(ocon_cat = (0(1)3)) subpop(if culture_dummy == 6)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Target Contribution") ytitle("Amount Punished", size(medlarge)) ///
				ylabel(0(1)4, labsize(med) nogrid) title("Confucian", size(large)) ///
				saving(p6, replace)
				
		gr combine p1.gph p2.gph p3.gph p4.gph p5.gph p6.gph 
		graph export FigureA5.png, height(1500) replace
		
	* Figure A6: Amount Punish by sender contribution and city (Figure A5, robustness for Figure 2)
		reg punishment c.senderscontribution##i.city_code##c.otherscontribution, cluster(new_cluster) robust 
			margins, dydx(senderscontribution) at(city_code = (1 2 3 4 5 6 7 8 9 10  11 12 13 14 15 16))
			marginsplot, csort yline(0) recast(scatter) ci1opts(recast(coefplot) color(black)) ///
				plot1opts(color(black) msymbol(circle)) ///
				title("") ///
				ytitle("Marginal Effect of Punisher" "Contribution on Punishment Amount", size(med)) xtitle("")  ///
				xlabel(1 "Boston" 2 "Melbourne" 3 "Nottingham" ///
				4 "St. Gallen" 5 "Chengdu" 6 "Zurich" 7 "Bonn" 8 "Copen." 9 "Dnip." ///
				10 "Seoul" 11 "Istanbul" 12 "Minsk" 13 "Samara" 14 "Riyadh" 15 "Athens" ///
				16 "Muscat", ang(30) labsize(med) nogrid) ylabel(-0.15(0.05)0.15, nogrid) 
				
		graph export FigureA6.png, height(1500) replace
		
	* Figure A7: Probability punished by sender contribution by culture 
	reg punish_dummy i.ocon_cat##c.scon_cat##i.culture_dummy, cluster(new_cluster)
	
		* English speaking
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 1)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("English Speaking", size(large)) ///
				saving(spr1, replace)
				
		* Protestant
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 2)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("Protestant Europe", size(large)) ///
				saving(spr2, replace)
				
		* Orthodox
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 3)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("Orthodox/Ex-Communist", size(large)) ///
				saving(spr3, replace)
				
		* Southern Euruope
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 4)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("Southern Europe", size(large)) ///
				saving(spr4, replace)
		
		* Arabic Speaking
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 5)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("Arabic Speaking", size(large)) ///
				saving(spr5, replace)
				
		* Confucian
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 6)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Pr(Punish)", size(medlarge)) ///
				ylabel(0(.25)1, labsize(med) nogrid) title("Confucian", size(large)) ///
				saving(spr6, replace)
				
		gr combine spr1.gph spr2.gph spr3.gph spr4.gph spr5.gph spr6.gph 
		graph export FigureA7.png, height(1500) replace

		
	* Figure A8: Amount punished by sender contribution by culture
		reg punishment i.ocon_cat##c.scon_cat##i.culture_dummy, cluster(new_cluster) // note -- same model as above 
	
		* English speaking
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 1)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("English Speaking", size(large)) ///
				saving(sp1, replace)
				
		* Protestant
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 2)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("Protestant Europe", size(large)) ///
				saving(sp2, replace)
				
		* Orthodox
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 3)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("Orthodox/Ex-Communist", size(large)) ///
				saving(sp3, replace)
				
		* Southern Euruope
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 4)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("Southern Europe", size(large)) ///
				saving(sp4, replace)
		
		* Arabic Speaking
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 5)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("Arabic Speaking", size(large)) ///
				saving(sp5, replace)
				
		* Confucian
		margins, at(scon_cat = (0(1)3)) subpop(if culture_dummy == 6)
			marginsplot, recast(scatter) ciopts(color(black)) plot1opts(msymbol(circle) mcolor(gs0)) ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20", nogrid labsize(med)) ///
				xtitle("Punisher Contribution") ytitle("Amount Punish", size(medlarge)) ///
				ylabel(0(1)3, labsize(med) nogrid) title("Confucian", size(large)) ///
				saving(sp6, replace)
				
		gr combine sp1.gph sp2.gph sp3.gph sp4.gph sp5.gph sp6.gph 
		graph export FigureA8.png, height(1500) replace
		
	* Figure A9
		reg punishment i.scon_cat##i.ocon_cat##i.culture_dummy, cluster(new_cluster) robust
	
		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 1)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("English Speaking") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc1, replace)

		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 2)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("Protestant Europe") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc2, replace)

		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 3)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("Orthodox/Ex-Communist") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc3, replace)
				
		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 4)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("Southern Europe") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc4, replace)
				
		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 5)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("Arabic Speaking") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc5, replace)

		margins, at(ocon_cat = (0(1)3)) over(scon_cat) subpop(if culture_dummy == 6)
		marginsplot, ///
				plot1opts(color("248 227 208") msymbol(circle) lpattern(solid)) ci1opts(color("248 227 208")) ///
				plot2opts(color("235 189 200") msymbol(square) lpattern(solid)) ci2opts(color("235 189 200")) ///
				plot3opts(color("172 142 170") msymbol(triangle) lpattern(solid)) ci3opts(color("172 142 170")) ///
				plot4opts(color("117 103 126") msymbol(diamond) lpattern(solid)) ci4opts(color("117 103 126")) ///
				xtitle("Target Contribution") ytitle("Amount Punished")  ylabel(0(1)5,nogrid) ///
				legend(subtitle("Punisher Contribution", size(medsmall)) order(5 "0" 6 "1-9" 7 "10-19" 8 "20") ///
				region(lcolor(black)) ring(0) pos(2) col(2)) title("Confucian") ///
				xlabel(0 "0" 1 "1-9" 2 "10-19" 3 "20",nogrid) saving(nlc6, replace)

		grc1leg nlc1.gph nlc2.gph nlc3.gph nlc4.gph nlc5.gph nlc6.gph, legendfrom(nlc1.gph)
		graph export FigureA9.png, height(1500) replace
		
	* Figure A10: Mean contribution by city -- see below

* Online Appendix: Tables
		
	* Table A1: Models for left panels of Figure 1
		eststo: reg punish_dummy c.senderscontribution##i.otherscontribution i.city_code, cluster(new_cluster) robust
		eststo: reg punishment c.senderscontribution##i.otherscontribution i.city_code, cluster(new_cluster) robust
		esttab  using TableA1.rtf, replace label ///
			mtitles( "Pr(Punish)" "Punishment Amount" ) se b(3)
		eststo clear
		
	* Table A2: Models for Figure 1 panel 3, Figure 2 Panel 3, Figure A1, Figure A6
		eststo: reg punish_dummy c.senderscontribution##c.otherscontribution##i.city_code, cluster(new_cluster) 
		eststo: reg punishment c.senderscontribution##c.otherscontribution##i.city_code, cluster(new_cluster) 
		esttab  using TableA2.rtf, replace label ///
			mtitles( "Pr(Punish)" "Punishment Amount") se b(3)
		eststo clear
		
	* Table A3: Regression results for interaction between target contributions, punisher contributions, and culture_dummy
		eststo: reg punish_dummy i.ocon_cat##i.scon_cat##i.culture_dummy, cluster(new_cluster)
		eststo: reg punishment i.ocon_cat##i.scon_cat##i.culture_dummy, cluster(new_cluster)
		esttab  using TableA3.rtf, replace label  wide nogaps ///
			mtitles( "Pr(Punish)" "Punishment Amount") se b(3)
		eststo clear
		
	* Table A4: Results for Figure 2 Panels 1 & 2
		eststo: reg punish_dummy i.senderscontribution##c.otherscontribution i.city_code, cluster(new_cluster) robust
		eststo: reg punishment i.senderscontribution##c.otherscontribution i.city_code, cluster(new_cluster) 
		esttab  using TableA4.rtf, replace label ///
			mtitles( "Pr(Punish)" "Punishment Amount") se b(3)
		eststo clear
		
	* Table A5: Proportion punishing at each level of target and punisher contribution
		tab scon_cat ocon_cat, summarize(punish_dummy) 
		
	* Table A6: Average punishment expenditure at each level of target and punisher contribution
		tab scon_cat ocon_cat, summarize(punishment) 
		
	* Table A7: Proportion punishing at each level of target and punisher contribution by culture
		bysort culture_dummy: tab scon_cat ocon_cat, summarize(punish_dummy) 
		
	* Table A8: Average punishment expenditure at each level of target and punisher contribution by culture
		bysort culture_dummy: tab scon_cat ocon_cat, summarize(punishment) 

	* Table A9: Results for Figure 3
		eststo: reg punish_dummy i.scon_cat##i.ocon_cat i.city_code, cluster(new_cluster) robust
		eststo: reg punishment i.scon_cat##i.ocon_cat i.city_code, cluster(new_cluster)
		esttab  using TableA9.rtf, replace label  ///
			mtitles( "Pr(Punish)" "Punishment Amount") se b(3)
		eststo clear

* Remaining Appendix Figures

	* Note: In order to genarate Figures A2-3 and A10, the data must be collapsed two different ways
	
	* Figure A2
	
			* Generate new city codes (styalistic choice for figure presentation)
			gen city_code_rev = 16 if(city == "Boston")
			replace city_code_rev = 15 if(city == "Melbourne")
			replace city_code_rev = 14 if(city == "Nottingham")
			replace city_code_rev = 13 if(city == "St. Gallen")
			replace city_code_rev = 12 if(city == "Chengdu")
			replace city_code_rev = 11 if(city == "Zurich")
			replace city_code_rev = 10 if(city == "Bonn")
			replace city_code_rev = 9 if(city == "Copenhagen")
			replace city_code_rev = 8 if(city == "Dnipropetrovs'k")
			replace city_code_rev = 7 if(city == "Seoul")
			replace city_code_rev = 6 if(city == "Istanbul")
			replace city_code_rev = 5 if(city == "Minsk")
			replace city_code_rev = 4 if(city == "Samara")
			replace city_code_rev = 3 if(city == "Riyadh")
			replace city_code_rev = 2 if(city == "Athens")
			replace city_code_rev = 1 if(city == "Muscat")
			
		* Collapse to average contribution by city and by others contribution
		collapse (mean) mean_con = senderscontribution (mean) punishment = punishment (sd) sdcon=senderscontribution, by(city_code_rev otherscontribution)
		
		gen city_code = city_code_rev
		
		twoway (connect punishment otherscontribution if(city_code == 1), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(yellow) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 2), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(gs10) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 3), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(diamond)) ///
			(connect punishment otherscontribution if(city_code == 4), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(brown) msymbol(diamond)) ///
			(connect punishment otherscontribution if(city_code == 5), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 6), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 7), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(pink) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 8), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(orange) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 9), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 10), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 11), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 12), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(blue) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 13), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(diamond)) ///
			(connect punishment otherscontribution if(city_code == 14), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(red) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 15), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(blue) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 16), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(circle)), ///
			xtitle("Target Contribution") ytitle("Mean Punishment") legend(order(16 "Boston" ///
			9 "Copenhagen" 13 "St. Gallen" 11 "Zurich" 14 "Nott." 7 "Seoul" 10 "Bonn" ///
			15 "Melbourne" 12 "Chengdu" 2 "Athens" 1 "Muscat" 3 "Riyadh" 4 "Samara" 5 "Minsk" 6 "Istanbul" 8 "Dnip." ///
			 ///
			 ))
		graph export FigureA2.png, height(1500) replace

	
	* Figure A3
		
		*English Speaking
		twoway (connect punishment otherscontribution if(city_code == 14), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(red) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 15), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(blue) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 16), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(circle)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Melbourne" 1 "Nott." 3 "Boston") size(med)) title("English Speaking", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture1, replace)

		*Protestant Europe (Copenhagen, Bonn, Zurich, St. Gallen)
		twoway(connect punishment otherscontribution if(city_code == 9), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 10), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 11), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 13), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(diamond)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Bonn" 1 "Copenhagen" 3 "Zurich" 4 "St. Gallen") size(med)) title("Protestant Europe", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture2, replace)
			 
		*Orthodox/Ex Communist (Misnk, Dnsk, Samara)
		twoway (connect punishment otherscontribution if(city_code == 4), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(brown) msymbol(diamond)) ///
			(connect punishment otherscontribution if(city_code == 5), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(green) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 8), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(orange) msymbol(triangle)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Minsk" 1 "Samara" 3 "Dnip." ///
			 ) size(med)) title("Orthodox/Ex-Communist", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture3, replace)

		*Southern Europe (Athens 2, Istanbul 6)
		twoway (connect punishment otherscontribution if(city_code == 2), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(gs10) msymbol(triangle)) ///
			(connect punishment otherscontribution if(city_code == 6), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(square)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Istanbul" 1 "Athens" ///
			 ) size(med)) title("Southern Europe", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture4, replace)

		*Arabic Speaking (Riyadh 3, Muscat 1)
		twoway (connect punishment otherscontribution if(city_code == 1), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(yellow) msymbol(circle)) ///
			(connect punishment otherscontribution if(city_code == 3), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(purple) msymbol(diamond)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Riyadh" 1 "Muscat" ///
			 ///
			 ) size(med)) title("Arabic Speaking", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture5, replace)

		*Confucian (Seoul 7, Chengdu 12)
		twoway (connect punishment otherscontribution if(city_code == 7), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(pink) msymbol(square)) ///
			(connect punishment otherscontribution if(city_code == 12), ylabel(0(.5)4) ///
			lpattern(solid) mcolor(blue) msymbol(circle)), ///
			xtitle("Target Contribution", size(medlarge)) ytitle("Mean Punishment", size(medlarge)) legend(order( ///
			2 "Chengdu" 1 "Seoul" ///
			 ) size(med)) title("Confucian", size(large)) xlabel(,labsize(med)) ///
			 ylabel(,labsize(med)) saving(culture6, replace)
			 
		*COMBINE BY CULTURE
		gr combine culture1.gph culture2.gph culture3.gph culture4.gph ///
			culture5.gph culture6.gph, col(3) xsize(10) ysize(5)
		graph export FigureA3.png, height(1500) replace
			
	* Figure A10
		
		* Re-open data
		import delimited HerrmannThoeniGaechterDATA.csv, clear
		
		* drop conditions without punishment
		drop if(p == "N-experiment")
	
		* Generate new city codes (styalistic choice for figure presentation)
		gen city_code_rev = 16 if(city == "Boston")
		replace city_code_rev = 15 if(city == "Melbourne")
		replace city_code_rev = 14 if(city == "Nottingham")
		replace city_code_rev = 13 if(city == "St. Gallen")
		replace city_code_rev = 12 if(city == "Chengdu")
		replace city_code_rev = 11 if(city == "Zurich")
		replace city_code_rev = 10 if(city == "Bonn")
		replace city_code_rev = 9 if(city == "Copenhagen")
		replace city_code_rev = 8 if(city == "Dnipropetrovs'k")
		replace city_code_rev = 7 if(city == "Seoul")
		replace city_code_rev = 6 if(city == "Istanbul")
		replace city_code_rev = 5 if(city == "Minsk")
		replace city_code_rev = 4 if(city == "Samara")
		replace city_code_rev = 3 if(city == "Riyadh")
		replace city_code_rev = 2 if(city == "Athens")
		replace city_code_rev = 1 if(city == "Muscat")
		
		* Collapse data to average contributions
		collapse (mean) mean_con = senderscontribution (sd) sdcon=senderscontribution ///
		(count) n=senderscontribution, by(city_code_rev)
		
		generate hicon = mean_con + invttail(n-1,0.025)*(sdcon / sqrt(n))
		generate lowcon = mean_con - invttail(n-1,0.025)*(sdcon / sqrt(n))

		twoway (bar mean_con city_code_rev, lcolor(gs0) fcolor("128 177 126") horizontal barw(0.60))  ///
			(rcap hicon lowcon city_code, color(gs2) horizontal), ///
			ylabel(16 "Boston" 15 "Melbourne" 14 "Nottingham" ///
			13 "St. Gallen" 12 "Chengdu" 11 "Zurich" 10 "Bonn" 9 "Copen." 8 "Dnip." ///
			7 "Seoul" 6 "Istanbul" 5 "Minsk" 4 "Samara" 3 "Riyadh" 2 "Athens" ///
			1 "Muscat") legend(off) xtitle("") ytitle("") ///
			title("Mean Contributions by City") 
		graph export FigureA10.png, height(1500) replace
		
		